#include<iostream>
using namespace std;
#include<vector>
#include<algorithm>
class Solution {
public:
    string& getSmallestString(string& s) {
        int n = s.size();
        for (int i = 1; i < n; ++i) {
            if (s[i - 1] > s[i] && (s[i - 1] - '0') % 2 == (s[i] - '0') % 2) {
                swap(s[i - 1], s[i]);
                return s;
            }
        }
        return s;
    }
};